feat(identity): add invite to Users service#609
Conversation
| }); | ||
|
|
||
| it('should throw when the user ID is undefined', async () => { | ||
| const user = createUserWithMethods(createBasicUser({ id: undefined as any }), mockService); |
There was a problem hiding this comment.
The as any cast is unnecessary. createBasicUser accepts Partial<RawUserGetResponse>, which makes id type string | undefined, so { id: undefined } is valid TypeScript without a cast. Same issue on line 69.
Convention: "No any type — use unknown if truly unknown, then validate."
| const user = createUserWithMethods(createBasicUser({ id: undefined as any }), mockService); | |
| const user = createUserWithMethods(createBasicUser({ id: undefined }), mockService); |
Review summaryNew finding posted this run:
Everything else checked out — transform pipeline, endpoint routing, type naming, pagination absence, JSDoc on |
fac9ccc to
fbfb6ef
Compare
|
fbfb6ef to
42cce96
Compare
c8571c5 to
5e31db9
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
5e31db9 to
3e38f55
Compare
42cce96 to
a6e787a
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
3e38f55 to
b94fcec
Compare
a6e787a to
cd68ac1
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
b94fcec to
7288fc2
Compare
Final slice of the Identity user management onboarding (follows the getById and CRUD PRs): - invite(users) POST /api/User/InviteUsers Each invited user receives an invitation email with an accept link. The API reports per-user outcomes — the request can succeed overall while individual invitations fail (e.g. disallowed redirect URL), surfaced via the renamed errorMessage field. Live-API findings encoded: redirectUrl is effectively required and must be a portal acceptInvite URL (the API gateway host is rejected per-user with "Redirect URL is not valid"); failed invitations return an all-zeros GUID. Adds the optional UIPATH_PORTAL_URL integration test config for environments where UIPATH_BASE_URL points at the API gateway host. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cd68ac1 to
f29a250
Compare
Summary
PR 3 of 3 splitting the Identity user management onboarding (stacked on #617, which stacks on #616). Adds the final method:
invite(users)POST /api/User/InviteUsersEach invited user receives an invitation email with an accept link that redirects to
redirectUrl. The API reports per-user outcomes — the request can succeed overall while individual invitations fail, surfaced viasuccess/errorMessageon each entry.Design notes
redirectUrlis effectively required and must be an allowed portalacceptInviteURL — the API gateway host is rejected per-user withRedirect URL is not valididerrorMsgis renamed toerrorMessagein the SDKtransformRequest:groupIds→groupIDs.UIPATH_PORTAL_URLfor environments whereUIPATH_BASE_URLpoints at the API gateway host.Testing
Stack
getByIdupdateById,deleteById,create+ bound entity methodsinviteCloudflare CORS worker: all five endpoints already whitelisted (
api/User/{x}pattern).🤖 Generated with Claude Code